package com.example.studentportrait.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.studentportrait.domain.entity.JobRecruitment;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.io.Serializable;
import java.util.List;

@Mapper
public interface JobRecruitmentMapper extends BaseMapper<JobRecruitment> {
    @Override
    int insert(JobRecruitment entity);
    @Select("SELECT * from job_recruitment where id=#{id}")
    int deleteById(Long id);
    @Override
    int updateById(JobRecruitment entity);
    @Select("SELECT * from job_recruitment where job_name=like concat('%',#{jobName},'%')")
    List<JobRecruitment> selectByName(String jobName);
    @Select("SELECT * from job_recruitment where required=like concat('%',#{required},'%')")
    List<JobRecruitment> selectByRequired(String required);
    @Select("SELECT * from job_recruitment where job_major=like concat('%',#{jobMajor},'%')")
    List<JobRecruitment> selectByMajor(String jobMajor);
    @Select("SELECT * FROM job_recruitment")
    List<JobRecruitment> selectAll();
}
